import request from '@/utils/request'

// 查询流程评估列表
export function listEvaluation(query) {
  return request({
    url: '/system/evaluation/list',
    method: 'get',
    params: query
  })
}

// 查询流程评估详细
export function getEvaluation(evaluationId) {
  return request({
    url: '/system/evaluation/' + evaluationId,
    method: 'get'
  })
}

// 新增流程评估
export function addEvaluation(data) {
  return request({
    url: '/system/evaluation',
    method: 'post',
    data: data
  })
}

// 修改流程评估
export function updateEvaluation(data) {
  return request({
    url: '/system/evaluation',
    method: 'put',
    data: data
  })
}

// 删除流程评估
export function delEvaluation(evaluationId) {
  return request({
    url: '/system/evaluation/' + evaluationId,
    method: 'delete'
  })
}

// 查询流程评估列表
export function getEvaluateInfo(processId) {
  return request({
    url: '/system/evaluation/getEvaluateInfo/' + processId,
    method: 'get'
  })
}

// 查询流程评估列表
export function getScore(processId) {
  return request({
    url: '/system/evaluation/getScore/' + processId,
    method: 'get'
  })
}

export function addOrUpdateEvaluateInfo(data) {
  return request({
    url: '/system/evaluation/addOrUpdateEvaluateInfo',
    method: 'post',
    data: data
  })
}


